package com.foreknow.service.impl;

import com.foreknow.dao.RegistlevelMapper;
import com.foreknow.entity.Registlevel;
import com.foreknow.service.RegistLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RegisLevelServiceImpl implements RegistLevelService {
    @Autowired
    private RegistlevelMapper registlevelMapper;

    @Override
    public List<Registlevel> queryAll() {
        return registlevelMapper.selectAllReg();
    }

    @Override
    public int insertReg(Registlevel registlevel) {
        return registlevelMapper.insertSelective(registlevel);
    }

    @Override
    public int deleteById(int id) {
        return registlevelMapper.deleteByPrimaryKey(id);
    }

    @Override
    public Registlevel selectById(int id) {
        return registlevelMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByReg(Registlevel registlevel) {
        return registlevelMapper.updateByPrimaryKeySelective(registlevel);
    }

    @Override
    public List<Registlevel> selectByChoose(Registlevel registlevel) {
        return registlevelMapper.selectByChoose(registlevel);
    }
}
